package com.atguigu.exam.mapper;


import com.atguigu.exam.entity.Question;
import com.atguigu.exam.vo.QuestionPageVo;
import com.atguigu.exam.vo.QuestionQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 题目Mapper接口
 * 继承MyBatis Plus的BaseMapper，提供基础的CRUD操作
 */
public interface QuestionMapper extends BaseMapper<Question> {

    //获取每个分类下的题目数量
    List <Map<Long,Long>> getCategoryCount();
//分页及带条件查询
    void getPageByCondition(Page<Question> pageData, QuestionQueryVo questionQueryVo);

    Question getQuestionDetailsById(Long id);

    List<Question> getQuestionListByPaperId(Integer id);
}